<?php
// +----------------------------------------------------------------------
// | 跨域文件上传处理
// +----------------------------------------------------------------------
// | Author: TongBC <50249101@qq.com>
// +----------------------------------------------------------------------
// | Date  : 2015/03/03
// +----------------------------------------------------------------------


$title = $_REQUEST['title'];
$index = $_REQUEST['index'];
$paths = $_REQUEST['paths'];
$types = $_REQUEST['types'];
$state = $_REQUEST['state'];
if($state=='success'){
	echo '<script>parent.uploadSuccess.'.$types.'("success","'.$paths.'");</script>';
	exit;
}else{
	echo '<script>parent.uploadSuccess.'.$types.'("fail","'.$_REQUEST['mesgs'].'");</script>';
	exit;
}


// $srcipt = <<< HTML
// <script>
// parent.jQuery("input.thumb_img").eq($index).val('{$paths}');
// parent.jQuery("img.preview").eq($index).attr('src','{$paths}').attr('title','{$title}');
// parent.jQuery("img.lnk_prv").eq($index).attr('href','{$paths}');
// parent.jQuery('.waitingUpload').eq($index).empty().text('上传成功！');
// </script>
// HTML;
// echo $srcipt;

?>